package gemini.pollux.batch.general;

import gemini.basic.batch.GmnJob;
import gemini.basic.manager.ShoppingManager;

import org.quartz.JobExecutionContext;

public class CleanJob extends GmnJob{
	
	private ShoppingManager shoppingManager;
	
	public void setShoppingManager(ShoppingManager shoppingManager) {
		this.shoppingManager = shoppingManager;
	}

	@Override
	protected boolean executeImpl(JobExecutionContext context) {
		shoppingManager.findAndDeleteUnusedDatabase();
		return true;
	}

	@Override
	protected String getBatchName() {
		return "Clean";
	}
}
